package com.haiyisoft.eclipse.uep.generate.simple.model;

import java.util.ArrayList;
import java.util.List;

public class PropertyPageModel {
	private String name;
	
	private String description;
	
	private PropertyPageModel parent;
	
	private List<PropertyPageModel> children;
	
	public PropertyPageModel(String name){
		this.name = name;
		children = new ArrayList<PropertyPageModel>();
	}
	
	public PropertyPageModel(String name, String description){
		this(name);
		this.description = description;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public PropertyPageModel getParent() {
		return parent;
	}

	public void setParent(PropertyPageModel parent) {
		this.parent = parent;
	}

	public List<PropertyPageModel> getChildren() {
		return children;
	}

	public void setChildren(List<PropertyPageModel> children) {
		this.children = children;
	}
	
	public void addChild(PropertyPageModel child){
		if(!children.contains(child))
			this.children.add(child);
	}
	
	public void delChild(PropertyPageModel child){
		this.children.remove(child);
	}
}
